<template>
  <IndexPage v-if="isLogin"/>
  <LoginPage v-on:loginSuc="modifyLoginState" v-else></LoginPage>
</template>

<script>
import IndexPage from "@/components/IndexPage";
import LoginPage from "@/components/LoginPage";


export default {
  name: 'LoginApp',
  components: {
    LoginPage,
    IndexPage
  },
  data() {
    return {
      isLogin: false
    }
  },
  mounted() {
    this.isLogin = localStorage.getItem("Token") !== null
  },
  methods: {
    modifyLoginState(info) {
      this.isLogin = info
    }
  }
}
</script>
<script setup>

</script>
<style>
</style>